﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DownloadFile.aspx.cs" Inherits="LabMS.Web.CommonPage.DownloadFile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>文件下载</title>
    <link type="text/css" rel="stylesheet" href="../style/screen.css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../style/ie7.css" />
    <![endif]-->
</head>
<body class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <asp:GridView Visible="false" AutoGenerateColumns="false" ID="Gv_FileItem" DataKeyNames="ID,Item_Address,Item_Name" runat="server" OnRowCommand="Gv_FileItem_RowCommand" CssClass="infoTable">
                <Columns>
                    <asp:BoundField DataField="Item_Name" HeaderText="文件名" />
                    <asp:TemplateField>
                        <HeaderTemplate>
                            文件类型
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lb_Type" runat="server" Text='<%# GetItemTypeString(Eval("Item_Type")) %>'  />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:ButtonField ButtonType="Link" CommandName="DownLoad" Text="下载" />
                </Columns>
                <HeaderStyle CssClass="header" />
                <EmptyDataTemplate>
                    暂时没有文件可下载
                </EmptyDataTemplate>
            </asp:GridView>
         </div>      
         <div class="main">
             <asp:GridView Visible="false" AutoGenerateColumns="false" ID="Gv_File" DataKeyNames="ID,Attach_Address,Attach_Name" runat="server" OnRowCommand="Gv_File_RowCommand" CssClass="infoTable" >
                <Columns>
                    <asp:BoundField DataField="Attach_Name" HeaderText="文件名" />
                    <asp:TemplateField>
                        <HeaderTemplate>
                            文件类型
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lb_Type" runat="server" Text='<%# GetTypeString(Eval("Attach_Type")) %>'  />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:ButtonField ButtonType="Link" CommandName="DownLoad" Text="下载" />
                </Columns>
                <HeaderStyle CssClass="header" />
                <EmptyDataTemplate>
                    暂时没有文件可下载
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
        
        <asp:Label ID="lb_Error" runat="server" />
        <script type="text/javascript">
        function foo(url)
        {
            window.open(url, "", "", "");
        }
        </script>
    </form>
</body>
</html>
